{extend name="main/index" /}
{block name="main"}

<div class="content-page">
    <div class="content">
        
   		<h2 class="text-muted">您所在的位置:公告</h2>
       	<!-- Button trigger modal -->
        <button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
 			添加新公告
        </button>

<!-- Modal -->
        <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">添加公告内容</h4>
            </div>
            <div class="modal-body">
           	<!-- formstar-->
            <form action="{:url('/admin/noticesave')}"  method="post" enctype="multipart/form-data">
                     <div class="form-group">
                        <label for="exampleInputEmail1">标题</label>
                        <input type="text" name="title" class="form-control" id="exampleInputEmail1" placeholder="title" required>
                    </div>
                    <div class="form-group">
                        <label for="exampleInputPassword1">详情内容</label>
                        <input type="textarea"name="text" class="form-control" id="exampleInputPassword1" placeholder="details" required>
                    </div>
                    <button type="submit" class="btn btn-default">Submit</button>
            </form>
            <!-- formend-->
            </div>
        </div>
        </div>
        </div>
        <table class="table table-hover">
		 <tr>
                        <th>noid</th>
                        <th>title</th>
                        <th class="col-md-6">发布时间</th>
                        <th>操作</th>

                    </tr>

                    {volist name="xuu" id="v" key="k"}
                    <tr>
                        <td>{$v['noid']}</td>
                        <td>{$v['title']}</td>
                        <td>{$v['time']}</td>
                        <td><a href="{:url('/noticedel',['id'=>$v['noid']])}"><button type="button" class="btn btn-success">详情</button></a><a href="{:url('/noticedel',['id'=>$v['noid']])}"><button type="button" class="btn btn-danger">删除</button></a>
                        </td>   
                    </tr>
                    {/volist}
                    
                    
                    
                    
                    
		</table>
      

    </div>
</div>

{/block}